home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-04-18 | 1.6 KB | 50 lines | [TEXT/GEOL] |
- Item 8705940 17-April-89 18:41
-
- From: ROLLIN1 Rollin, Keith A.
-
- To: MACAPP.TECH$ MACAPP Tech
-
- Sub: Re- Overriding NEW
-
- To: R Andrews, Command Central, D2987,
-
- The easiest way to not create a new document when starting an application is to
- override your TApplication.HandleFinderRequest thus:
-
- PROCEDURE TYourApplication.HandleFinderRequest; OVERRIDE;
- BEGIN
- IF gFileCount > 0 THEN
- INHERITED HandleFinderRequest;
- END;
-
- This way, documents get opened if you double-click on their icons, but no new
- document is created if you double-click on the application's icon.
-
-
- In the second part, I assume that you are talking about implementing the
- following sequence of event:
-
- 1. The user selects New in the File menu.
-
- 2. They are presented with the following dialog box:
-
- +---------------------------------------------+
- | This game will severely affect your grades |
- | and ruin your chances of ever going to |
- | college. Are you sure you want to do this? |
- | |
- | Yes! I guess not... |
- +---------------------------------------------+
-
- 3. The user presses "Yes!", or just presses "I guess not..."
-
- You can do this by overriding TYourApplication.OpenNew. First of all, create
- your dialog box and call PoseModally for it. If the user clicked on "Yes!",
- then call INHERITED OpenNew, creating your document.
-
- Hope this helps,
-
- - Keith Rollin
- - Apple Developer Technical Support
-
-